<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="__STATIC__/xadmin/css/font.css">
    <link rel="stylesheet" href="__STATIC__/xadmin/css/xadmin.css">
    <script src="__STATIC__/xadmin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__STATIC__/xadmin/js/xadmin.js"></script>
</head>

<body>
    <div class="x-nav">
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
        </a>
    </div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <form class="layui-form layui-col-space5" method="get" action="{:url('account/accdet')}">
                            <div class="layui-input-inline layui-show-xs-block">
                                <input class="layui-input" placeholder="开始日" value="{$start}" name="start" id="start">
                            </div>
                            <div class="layui-input-inline layui-show-xs-block">
                                <input class="layui-input" placeholder="截止日" value="{$end}" name="end" id="end">
                            </div>
                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="type">
                                    <option value="">操作类型</option>
                                    <option value="1" {if condition="$type eq 1"}selected{/if}>消费</option>
                                    <option value="2" {if condition="$type eq 2"}selected{/if}>充值</option>
                                    <option value="3" {if condition="$type eq 3"}selected{/if}>退款</option>
                                </select>
                            </div>
                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i></button>
                            </div>
                        </form>

                    </div>
                    <div class="layui-card-header">
                        <button class="layui-btn" onclick="xadmin.open('添加','{:url('account/addrecharge');}',500,500)"><i class="layui-icon"></i>添加</button>
                    </div>
                    <div class="layui-card-body ">
                        <table class="layui-table layui-form">
                            <thead>
                                <tr>
                                    <th width="30">ID</th>
                                    <th>日期</th>
                                    <th>账号</th>
                                    <th>广告商</th>
                                    <th>操作后币余额</th>
                                    <th>操作币金额</th>
                                    <th>操作金额</th>
                                    <th>操作类型</th>
                                    <th>公司账户</th>
                                    <th>操作时间</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name="list" id="vo"}
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.e_date}</td>
                                    <td>{$vo.accname}</td>
                                    <td>{$vo.accid|get_ader_name}</td>
                                    <td>{$vo.balance}</td>
                                    <td>{$vo.coin}</td>
                                    <td>{$vo.money}</td>
                                    <td>{if condition="$vo.type eq 1"}消费{elseif condition="$vo.type eq 2"}充值{elseif condition="$vo.type eq 3"}退款{/if}</td>
                                    <td>{$vo.compayacc}</td>
                                    <td>{$vo.add_time|date="Y-m-d H:i:s",###}</td>
                                    <td>{$vo.remarks}</td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                           {$list->render()}<p style="padding:10px;display:inline-block;">共&nbsp;&nbsp;{$list->total()}&nbsp;条</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    layui.use(['laydate', 'form'],function() {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });

</script>
</html>